import { mapGetters } from 'vuex'

const AuthChecking = {
    computed: {
        ...mapGetters(['isLogin'])
    },
    async onShow() {
		console.log(1111);
        if (!await this.isLogin) {
					uni.getStorage({
						key: 'invite_code',
						success: function (res) {
							uni.redirectTo({
								url: '/packs/pages/auth/auth?invite_code=' + res.data
							})
						},
						fail:function(){
							uni.redirectTo({
								url: '/packs/pages/auth/auth'
							})
						}
					})  
        }
    }
}

export default AuthChecking
